#ifndef RENDERER_H_INCLUDED
#define RENDERER_H_INCLUDED

#include "Thread_Wrapper.h"
#include "Layer_List.h"
#include "Layer.h"
#include "Debug.h"
#include "CurrentSpritePointer.h"

class Renderer : public Thread_Wrapper {
    Layer_List &layer_list;
    Viewport &viewport;
    Uint32 last_update_time;
    Uint32 update_interval;
    CurrentSpritePointer cspointer;

    ///Render's copy of viewports co-ordinate
    int viewport_x;
    int viewport_y;
protected:
    static Renderer* instance;
    virtual void execute();

public:
    static Renderer* get_instance();
    static void destroy();
    ~Renderer();

protected:
    Renderer();
    void render();
};

#endif // RENDERER_H_INCLUDED
